package com.yanfan.zutai.domain;

import com.yanfan.common.annotation.Excel;
import com.yanfan.common.core.domain.BaseEntity;
import lombok.Getter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 组态用户对象 b_device_zt_user
 *
 * @author kerwincui
 * @date 2024-02-02
 */
@Getter
public class BDeviceZtUser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 组态ID
     */
    private String ztId;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 租户ID
     */
    @Excel(name = "租户ID")
    private Long tenantId;

    /**
     * 租户名称
     */
    @Excel(name = "租户名称")
    private String tenantName;

    /**
     * 组态名称
     */
    @Excel(name = "组态名称")
    private String ztName;

    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    private String phonenumber;

    /**
     * 用户昵称
     */
    @Excel(name = "用户昵称")
    private String userName;

    /**
     * 是否为设备所有者（0=否，1=是）
     */
    @Excel(name = "是否为设备所有者", readConverterExp = "0==否，1=是")
    private Long isOwner;

    /**
     * 用户物模型权限，多个以英文逗号分隔
     */
    @Excel(name = "用户物模型权限，多个以英文逗号分隔")
    private String perms;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    public void setZtId(String ztId) {
        this.ztId = ztId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public void setTenantName(String tenantName) {
        this.tenantName = tenantName;
    }

    public void setZtName(String ztName) {
        this.ztName = ztName;
    }

    public void setPhonenumber(String phonenumber) {
        this.phonenumber = phonenumber;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public void setIsOwner(Long isOwner) {
        this.isOwner = isOwner;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("ztId", getZtId())
                .append("userId", getUserId())
                .append("tenantId", getTenantId())
                .append("tenantName", getTenantName())
                .append("ztName", getZtName())
                .append("phonenumber", getPhonenumber())
                .append("userName", getUserName())
                .append("isOwner", getIsOwner())
                .append("perms", getPerms())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
